import {configureStore} from '@reduxjs/toolkit'
import userReducer from './modules/user'
import {TypedUseSelectorHook, useDispatch, useSelector} from "react-redux";
const store = configureStore({
  reducer:{
    user: userReducer
  }
})
type RootState = ReturnType<typeof store.getState>
type RootDispatch = typeof store.dispatch
export const useStoreSelector:TypedUseSelectorHook<RootState> = useSelector
export const useStoreDispatch: ()=> RootDispatch = useDispatch
export default store
